package mq

import (
	"charging_pile/devices/internal/svc"
	"charging_pile/util/protocol/jiuxing"
	"time"

	"github.com/zeromicro/go-zero/core/logx"
)

var channel25 = make(chan *jiuxing.Package, 1000)

func handle25(nc *natsClient, in *jiuxing.Package) *jiuxing.Package {
	msg := jiuxing.Msg25{}
	msg.Decode(in.Payload)
	logx.Infof("msg25:%+v", msg)
	return nil
}

func beachHand25(nc *svc.ServiceContext) {
	for {
		select {
		case pack := <-channel25:
			print(pack)
		case <-time.After(500 * time.Millisecond):

		}
	}
}

func init() {
	HandlerMap[uint8(0x25)] = handle25
}
